<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <p id="one"></p>
    <p id="two"></p>

    <script>
        // var num = 1;
        // var myfunc = function (){
        //     document.getElementById("one").innerHTML += num + "&nbsp;";
        // }
        // setInterval(myfunc, 500);

        setInterval(function (){
            var d = new Date();
            document.getElementById('two').innerHTML = d.toLocaleTimeString();
        }, 1000)

    </script>

</body>
</html>